namespace Nico {
    [GtkTemplate (ui='main.ui')]] 
    class Client : Box {
 
        [GtkChild]
        private ScrolledWindow session_list;

        [GtkChild]
        
           
        public Client(string[] argv) {
            var c = new Client("localhost", 8477, GLib.Environment.get_user_name());
            c.sessions_changed.connect(()=>{
            });
            c.locations_changed.connect((locations)=>{
                foreach (var loc in locations) message(loc);
                GLib.Idle.add(()=>{
                    c.create_session(new DateTime.now(new TimeZone.local()), "vordertuer");
                    return false;
                });
            });
            c.send_helo();
    
            c.resources.tabak = true;
    
            (new GLib.MainLoop()).run();
        }
    }


}
